import { Component, OnInit } from '@angular/core';
import { MockRequest, MockStatusError } from '@delon/mock';

@Component({
  selector: 'app-insurance-manages',
  templateUrl: './insurance-manages.component.html',
  styleUrls: ['./insurance-manages.component.less']
})
export class InsuranceManagesComponent implements OnInit {
  find: any;
  constructor() {}
  listItem: any;
  value: any;
  next: any;
  head: any;
  head2: any;
  ngOnInit() {
    this.link_list();
  }

  initList() {
    this.listItem = {
      type: 'tabs',
      items: [
        {
          type: 'section',
          label: { en: 'Plan Details' },
          items: [
            {
              id: 'basicInfo',
              key: 'basicConfig',
              type: 'section',
              label: { en: 'Basic Info' },
              items: [
                {
                  id: 'currency',
                  path: 'currency',
                  label: { en: 'Currency' },
                  dimension: 'small'
                },
                {
                  id: 'paymentMode',
                  path: 'paymentMode',
                  label: { en: 'Payment Mode' },
                  dimension: 'small'
                }
              ]
            },
            {
              id: 'plans.0',
              key: 'planConfig',
              type: 'section',
              items: [
                {
                  id: 'sumAssured',
                  type: 'number',
                  label: { en: 'Sum Assured' }
                },
                {
                  id: 'premium',
                  type: 'number',
                  label: { en: 'Premium' }
                }
              ]
            },
            {
              id: 'plans',
              type: 'checkList',
              key: '@riders@pid@productName@properties@planConfig@insuredConfig',
              startIndex: 1,
              options: [],
              items: [
                {
                  id: 'sumAssured',
                  type: 'number',
                  label: { en: 'Sum Assured' }
                },
                {
                  id: 'premium',
                  type: 'number',
                  label: { en: 'Premium' }
                }
              ]
            }
          ]
        },
        {
          type: 'section',
          label: { en: 'Proposal' },
          items: []
        }
      ]
    };
  }

  Node(_value: any) {
    this.value = _value;
    this.next = null;
  }

  link_list() {}
}
